
var oBox = document.querySelector(".box")
//结束日期
var end = new Date(2021, 10, 1);
setInterval(function () {
    //动态的当前日期
    var curent = Date.now();
    var num = end - curent; //毫秒数
    var ms = num % 1000;// 毫秒
    var ss = parseInt(num / 1000) % 60;//秒
    var mm = parseInt(num / 1000 / 60) % 60;//分
    var hh = parseInt(num / 1000 / 60 / 60) % 24;//时
    var dd = parseInt(num / 1000 / 60 / 60 / 24);//时

    var str = `倒计时:${dd}天${hh}时${mm}分${ss}秒${ms}毫秒`;
    oBox.innerHTML = str.fontcolor("#fff");
})


var oUpLis = document.querySelectorAll(".boxtxt3 li");
var oBoximg = document.querySelectorAll(".list-img ul");

for (var i = 0; i < oUpLis.length; i++) {
    oUpLis[i].tempIndex = i;
    oUpLis[i].onmousemove = function () {
        //点击后,排他,遍历清除所有的 active类名称
        for (var j = 0; j < oUpLis.length; j++) {
            oUpLis[j].className = "on";
            oBoximg[j].className = "imgbox3";
        }
        this.className = "on  active";
        //下标对应
        oBoximg[this.tempIndex].className = "selected"
    }
}










